import request from "./request"

// 请求首页数据
export const GetHomeData = () => request.get("index/index")

// 请求搜索数据
export const GetSearchData = () => request.get("/search/index")

// 请求搜索提示的数据
export const GetSearchTipsData = (keyword) => request.get("/search/helper", {
    params: {
        keyword: keyword
    }
})
// 简写
// export const GetSearchTipsData = (params)=>request.get("/search/helper",{params}) // 错误

// 请求搜索产品展示数据
export const GetSearchgoodsData = (params) => request.get("/goods/list", { params })

// 请求专题数据
export const GetTopicData = (params) => request.get("/topic/list", { params })

// 请求删除历史记录
export const clearHistorySearch = () => request.post("/search/clearhistory")

// 请求登录页面请求
// export const GoLogin = (params) => request.post("/auth/loginByWeb",params)
// 请求用户页面数据
export const GetUserData = (params) => request.post("/auth/loginByWeb", params)

// 请求商品详情
export const GetProductDeteilData = (params) => request.get('/goods/detail', { params })

// 请求相关产品数据
export const GetProductrelatedData = (params) => request.get('/goods/related', { params })

// 请求购物车数量数据
export const GetGoodScount = () => request.get("/cart/goodscount")

// 请求加入购物车数据
export const AddtoCart = (params) => request.post("/cart/add", params)

// 请求购物车页面列表数据
export const GetCartData = () => request.get("/cart/index")

// 请求购物列表数据
export const GetgoodsItemData = (params) => request.post("/cart/checked", params)

// 请求步进器事件请求
export const GetStepper = (params) => request.post("/cart/update", params)


// 请求分类页面数据
export const GetCatalogNavData = () => request.get("/catalog/index")


